package com.example.online_chat.model;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface FriendReqMapper {
    // 通过用户名模糊匹配用户
    List<FriendReq> getSearchList(String username, String myName);

    // 获取发起方
    List<FriendReq> getInitiator(int userId);

    // 获取接收方
    List<FriendReq> getReceiver(int userId);

    List<Integer> searchFriend(int initiator);

    Integer getUserIdByName(String username);

    void addFriendReq(FriendReq req);

    void delete(Integer initiator, Integer receiver);

    void addFriend(int userId, int friendId);
}
